#pragma once

#include "CEmitter.h"
#include "SGD Wrappers/CSGD_Direct3D.h"

class CParticle
{
	float m_fPosX;
	float m_fPosY;
	float m_fVelX;
	float m_fVelY;
	float m_fInitialVelX;
	float m_fInitialVelY;
	float m_fAge;
	float m_flifeSpan;
	float m_fscale;
	float gravX;
	float gravY;
	float startPosX;
	float startPosY;
	D3DXCOLOR startColor;
	D3DXCOLOR endColor;
	D3DXCOLOR currColor;
	D3DXCOLOR colorChange;

public:
	//Accessors
	float GetPosX() {return m_fPosX;}
	float GetPosY() {return m_fPosY;}
	float GetScale() {return m_fscale;}
	float GetAge() {return m_fAge;}
	float GetLifespan() {return m_flifeSpan;}
	D3DXCOLOR GetCurrColor() {return currColor;}
	//Modifiers
	void SetStartPos(float X, float Y)
	{
		startPosX = X;
		startPosY = Y;
	}

	CParticle();
	~CParticle();

	void Init(float posX, float posY, float velX, float velY, float lifeSpan, float scale, float Xgrav, float Ygrav, D3DXCOLOR scolor, D3DXCOLOR ecolor);
	void Update(float fDelta);
	void Shutdown();
	void Render();

};